<!DOCTYPE html>
<html>
    <head>
        <title>simplegrid</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <script src="../avalon.js"></script>
        <script src="../highlight/shCore.js">

        </script>
        <script>
            require(["simplegrid/avalon.simplegrid"], function() {


                avalon.define("test", function(vm) {
                    vm.simplegrid = {
                        columns: [{field: "xxx", width: "20%", text: "表头1(20%) "},
                            {field: "yyy", width: "30%", text: "表头2(30%) "},
                            {field: "zzz", width: "50%", text: "表头3(50%) "}],
                        data: [
                            {
                                xxx: 10, yyy: 1, zzz: 1
                            },
                            {
                                xxx: 20, yyy: 2, zzz: 2
                            },
                            {
                                xxx: 30, yyy: 3, zzz: 3
                            },
                            {
                                xxx: 40, yyy: 4, zzz: 4
                            }
                        ]
                    }

                    vm.$skipArray = ["simplegrid"]
                })
                avalon.scan()
            })
        </script>
    </head>
    <body >
        <fieldset ms-controller="test">
            <legend>列宽以预定的百分比划分,不能改变列宽</legend>
            <div ms-widget="simplegrid">

            </div>
            <pre class="brush:html;gutter:false;toolbar:false;">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;simplegrid&lt;/title&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;meta name="viewport" content="width=device-width"&gt;
        &lt;script src="../avalon.js"&gt;&lt;/script&gt;

        &lt;script&gt;
            require(["simplegrid/avalon.simplegrid"], function() {
                avalon.define("test", function(vm) {
                    vm.simplegrid = {
                        columns: [{field: "xxx", width: "20%", text: "表头1(20%) "},
                            {field: "yyy", width: "30%", text: "表头1(30%) "},
                            {field: "zzz", width: "50%", text: "表头1(50%) "}],
                        data: [
                            {
                                xxx: 10, yyy: 1, zzz: 1
                            },
                            {
                                xxx: 20, yyy: 2, zzz: 2
                            },
                            {
                                xxx: 30, yyy: 3, zzz: 3
                            },
                            {
                                xxx: 40, yyy: 4, zzz: 4
                            }
                        ]
                    }
                    vm.$skipArray = ["simplegrid"]
                })
                avalon.scan()
            })
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body  ms-controller="test"&gt;
            &lt;div ms-widget="simplegrid"&gt;

            &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;

            </pre>
        </fieldset>


    </body>
</html>
